<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <link rel="icon" type="image/svg+xml" href="/vite.svg">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>运维百事通</title>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background-color: #f3f8f9;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      overflow: hidden;
    }
    .container {
      width: 90%;
      max-width: 600px;
      background-color: #ffffff;
      border-radius: 15px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      height: 100%;
    }
    h1 {
      text-align: center;
      color: #5165ea;
      padding: 20px;
      background-color: #e2eeff;
      margin-bottom: 10px;
    }
    #results {
      flex-grow: 1;
      padding: 20px;
      overflow-y: auto;
      height: calc(100% - 100px); /* Adjusted to ensure space for input and button */
    }
    #result {
      width: 100%;
      white-space: pre-wrap;
    }
    #sendVal {
      display: flex;
      border-top: 1px solid #ddd;
    }
    #question {
      flex-grow: 1;
      padding: 15px;
      border: none;
      outline: none;
      font-size: 16px;
    }
    #btn {
      background-color: #5d7cff;
      color: white;
      border: none;
      padding: 15px;
      cursor: pointer;
      font-size: 16px;
      transition: background-color 0.3s;
    }
    #btn:hover {
      background-color: #4c6ed5;
    }
    .user-message,
    .assistant-message {
      padding: 10px;
      margin: 5px 0;
      border-radius: 5px;
      max-width: 70%;
      word-break: break-word;
    }
    .user-message {
      background-color: #d1f7d1;
      align-self: flex-start;
    }
    .assistant-message {
      background-color: #f1f1f1;
      align-self: flex-end;
    }
  </style>
</head>
<body>
  <div class="container">
    <h1>运维百事通</h1>
    <div id="results">
      <div id="result"></div>
    </div>
    <div id="sendVal">
      <input id="question" type="text" placeholder="请输入您的问题...">
      <button id="btn">发送信息</button>
    </div>
  </div>
  <script type="module" src="main.js"></script>
</body>
</html>



